<!DOCTYPE html>
<!--[if IE 7]>    <html class="no-js ie7 ie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 ie" lang="en"> <![endif]-->
<!--[if IE 9]>    <html class="no-js ie9 ie" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
	<head>
		<meta charset="utf-8" />
		<title>技术问答_${webName}</title>
		<meta name="description" content="" />
		<meta name="author" content="HuangBQ | ${wwwRoot}" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<#include "../inc/head-common.ftl">
		<#include "../inc/wysiwyg.ftl">
	</head>
	<body>
		<#include "../inc/header.ftl">
		
		<!-- Main content -->
		<div class="container" role="main">
		
			<!-- Breadcrumbs -->
			<ul class="breadcrumb">
				<li><a href="${wwwRoot}"><span class="icon-home"></span> ${wwwName}</a></li>
				<li><a href="${webRoot}">${webName}</a></li>
				<li><a href="${webRoot}qa.do">技术问答</a></li>
				<li class="active">我要提问</li>
			</ul>
			<!-- Breadcrumbs -->
			
			<!-- Main data container -->
			<div class="content">
			
				<!-- Page header -->
				<div class="page-header">
					<h1><span class="icon-question-sign"></span> 技术问答 <small>一般问题1小时内会得到专家回复，最慢4小时</small></h1>
					<ul class="page-header-actions">
						<li><a href="#typography" class="btn pull-right btn-wuxia" title="我来回答" target="_blank"><span class="icon-share"></span> 分享给朋友</a></li>
					</ul>
				</div>
				<!-- /Page header -->
				
				<!-- Page container -->
				<div class="page-container">
				
					<!-- Grid row -->
						<div class="row">

							<article class="span9">
								
								<form class="form-horizontal" id="frmAddQuestion" action="${webRoot}qa/add/question.do" method="post"/>
									<fieldset>
										<div class="control-group">
											<label class="control-label">简述问题：</label>
											<div class="controls">
											    <input type="hidden" name="point" value="${point}"/>
											    <input type="hidden" name="contentid" value="${contentid}"/>
												<input id="question" name="question" class="input-xlarge" type="text" />
												<!--p class="help-block">20字内描述你的问题</p-->
											</div>
										</div>
										<div class="control-group">
											<label class="control-label">详细说明：</label>
											<div class="controls">
												<textarea id="editor" name="description" placeholder="请详细描述你的问题 ..."></textarea>
											</div>
										</div>
										<div class="form-actions" id="form-actions">
										    <button class="btn btn-primary btn-wuxia btn-large" id="submitquestion" type="button">提交问题</button>
										</div>
									</fieldset>
								</form>
								
							</article>
							
							<article class="span3">
								
									<h2>小提示： </h2>
									<p>你在此提交的问题会自动提交到 <a href="${webRoot}qa.do" target="_blank">技术问答</a>.大讲台的老师和同学们或许能帮你解决掉！一般会在1小时内回复，请注意查看。</p>
									
							</article>
							
						</div>
						<!-- /Grid row -->
					
				</div>
				<!-- /Page container -->
				
			</div>
			<!-- /Main data container -->
			
		</div>
		<!-- /Main content -->
		
		<#include "../inc/footer.ftl">
		<script>
			$(document).ready(function() {
				/*提交表单*/
				$('#submitquestion').click(function(){
				       submitForm();
				});
				
			});
			/*提交表单*/
			function submitForm(){
			          var flag = checkForm();
				      if(flag==false){
				         $('#submitquestion').pops({title:'', text:'请将内容填写完整！',type:'error',top:10, left:120, showClose : false,timeout:3000});
				         return false;
				      }
				     document.getElementById("frmAddQuestion").submit();
			}
			/*表单地址*/
			function checkForm(){
			     var flag = true;
			     var question = $.trim($('#question').val());
			     if(question==""){
			         flag = false;
			     }
			     var description = $.trim($('#editor').val());
			     if(description==""){
			         flag = false;
			     }
			     return flag;
			}
		</script>
		<script src="${scriptRoot}pops.js" type="text/javascript"></script>
</body>
</html>
